// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'DetailId',
        footer: "Foots",
        cnName: '调拨明细表',
        name: 'TransferDetail',
        url: "/TransferDetail/",
        sortName: "DetailId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"TransferOrderNo":"","ProductId":"","ProductName":"","ProductNo":"","Spec":"","Unit":"","ProductType":"","OutWarehouseStock":"","InWarehouseStock":"","TransferQty":"","UnitPrice":"","TransferAmount":"","OutQty":"","UnOutQty":"","InQty":"","UnInQty":""};
    const editFormOptions = [[{"title":"关联调拨单号","required":true,"field":"TransferOrderNo","disabled":true}],
                              [{"dataKey":"货品信息","data":[],"title":"商品 ID","required":true,"field":"ProductId","disabled":true,"type":"select"}],
                              [{"title":"商品名称","required":true,"field":"ProductName"}],
                              [{"title":"商品编号","required":true,"field":"ProductNo"}],
                              [{"title":"商品规格","field":"Spec"}],
                              [{"title":"商品单位","field":"Unit"}],
                              [{"title":"商品类型","field":"ProductType"}],
                              [{"title":"调出仓库库存快照","field":"OutWarehouseStock","type":"number"}],
                              [{"title":"调入仓库库存快照","field":"InWarehouseStock","type":"number"}],
                              [{"title":"调拨数量","required":true,"field":"TransferQty","type":"number"}],
                              [{"title":"商品单价","field":"UnitPrice","type":"decimal"}],
                              [{"title":"调拨金额","field":"TransferAmount","type":"decimal"}],
                              [{"title":"已出库数量","required":true,"field":"OutQty","type":"number"}],
                              [{"title":"未出库数量","required":true,"field":"UnOutQty","type":"number"}],
                              [{"title":"已入库数量","required":true,"field":"InQty","type":"number"}],
                              [{"title":"未入库数量","required":true,"field":"UnInQty","type":"number"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'DetailId',title:'明细 ID',type:'int',link:true,sort:true,width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'TransferOrderNo',title:'关联调拨单号',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductId',title:'商品 ID',type:'bigint',bind:{ key:'货品信息',data:[]},width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductName',title:'商品名称',type:'string',width:120,require:true,align:'left',sort:true},
                       {field:'ProductNo',title:'商品编号',type:'string',width:110,require:true,align:'left'},
                       {field:'Spec',title:'商品规格',type:'string',width:110,align:'left'},
                       {field:'Unit',title:'商品单位',type:'string',width:110,align:'left'},
                       {field:'ProductType',title:'商品类型',type:'string',width:110,align:'left'},
                       {field:'OutWarehouseStock',title:'调出仓库库存快照',type:'int',width:110,align:'left'},
                       {field:'InWarehouseStock',title:'调入仓库库存快照',type:'int',width:110,align:'left'},
                       {field:'TransferQty',title:'调拨数量',type:'int',width:110,require:true,align:'left'},
                       {field:'UnitPrice',title:'商品单价',type:'decimal',width:110,align:'left'},
                       {field:'TransferAmount',title:'调拨金额',type:'decimal',width:110,align:'left'},
                       {field:'OutQty',title:'已出库数量',type:'int',width:110,require:true,align:'left'},
                       {field:'UnOutQty',title:'未出库数量',type:'int',width:110,require:true,align:'left'},
                       {field:'InQty',title:'已入库数量',type:'int',width:110,require:true,align:'left'},
                       {field:'UnInQty',title:'未入库数量',type:'int',width:110,require:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}